import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'

import router from './router'
import store from './store'
import App from './App.vue'
import './global.scss'

// 引入directives插件
import directives from './directives'
//引入components插件
import components from './components'
const app = createApp(App)

//将icon组件注册到全局
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
//使用插件

app.use(ElementPlus).use(directives).use(components).use(router).use(store)
app.mount('#app')
